import { useChatStore } from '@/store/ChatStore'

import ChatItem from './ChatItem'

const ChatList = () => {
  const { messageList } = useChatStore()
  return (
    <div className="min-w-48 pl-10">
      {messageList.map(message => (
        <ChatItem key={message.msgId} message={message} />
      ))}
    </div>
  )
}

export default ChatList
